using ERPBackend.Models;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace ERPBackend.Services
{
    public interface IPurchaseOrderService
    {
        Task<IEnumerable<PurchaseOrder>> GetAllPurchaseOrdersAsync();
        Task<PurchaseOrder> GetPurchaseOrderByIdAsync(int id);
        Task<IEnumerable<PurchaseOrder>> GetPurchaseOrdersBySupplierIdAsync(int supplierId);
        Task<IEnumerable<PurchaseOrder>> SearchPurchaseOrdersAsync(string orderCode, int? status, DateOnly? startDate, DateOnly? endDate);
        Task<PurchaseOrder> CreatePurchaseOrderAsync(PurchaseOrder purchaseOrder);
        Task<bool> UpdatePurchaseOrderAsync(PurchaseOrder purchaseOrder);
        Task<bool> DeletePurchaseOrderAsync(int id);
        Task<bool> ReviewPurchaseOrderAsync(int id, int reviewedBy, bool isApproved, string comments);
        Task<bool> ClosePurchaseOrderAsync(int id, int closedBy, string reason);
    }
}